package com.t3go.t3_map.utils;

import com.t3go.t3_map.entity.Annotation;

import java.util.HashMap;
import java.util.Map;

public class AnnotationUtil {

    public static String getBubbleType(Annotation data) {
        if (data == null) {
            return null;
        }
        HashMap<String, Object> args = data.getArgs();
        if (args == null) {
            return null;
        }
        Object bubbleObj = args.get("bubble");
        if (bubbleObj instanceof Map) {
            Object value = ((Map<?, ?>) bubbleObj).get("bubbleType");
            if (value instanceof String) {
                return (String) value;
            }
        }
        return null;
    }


}